package com.veo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.veo.entity.Order;
import com.veo.entity.OrderQueryVo;

import java.util.List;

public interface OrderMapper extends BaseMapper<Order> {
    /**
     * 根据用户id查询用户订单以及订单明细
     */
    List<Order> findOrderAnderOrderDetailListByUser(OrderQueryVo orderQueryVo);

    /**
     * 获取所有用户订单
     * @return
     */
    List<Order> findAllOrder();

    /**
     * 根据订单id查询订单
     * @param orderId
     * @return
     */
    Order findOrderById(Integer orderId);

    Integer findOrderCountByUser(OrderQueryVo orderQueryVo);
}
